package com.group.flagtivities;

import android.content.res.AssetManager;
import android.graphics.Typeface;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class TextUtil {

	public static void setFont(ViewGroup vg, AssetManager assets) {
		for (int i = 0; i < vg.getChildCount(); i++) {
			View v = vg.getChildAt(i);
			if (v instanceof TextView) {
				((TextView) v).setTypeface(Typeface.createFromAsset(assets, "fonts/Chunkfive.otf"));
			}else if (v instanceof ViewGroup) {
				setFont((ViewGroup) v, assets);
			}
		}
	}
	
}
